package com.example.service;

import org.springframework.stereotype.Service;

@Service
public class orderserviceimp implements orderservice {

    @Override
    public void add(String pname, int number) {
        System.out.println("添加商品: " + pname + ", 数量: " + number);
    }

    @Override
    public void delete(String pname) {
        System.out.println("删除商品: " + pname);
    }

    @Override
    public int find(String pname) {
        System.out.println("查询商品: " + pname);
        return (int) (Math.random() * 10) + 1; // 模拟返回一个随机数量
    }
}